package Test;
import java.util.ArrayList;
import java.util.Scanner;

public class Fruit {
	private String name;	

	public Fruit(String name) {
		super();
		this.name = name;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Fruit other = (Fruit) obj;
		if (name == null) {
			if (other.name != null)
				return false;
		} else if (!name.equalsIgnoreCase(other.name))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "Fruit [name=" + name + "]";
	}
	
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner in=new Scanner(System.in);
		while(in.hasNext()){
			ArrayList<Fruit> fruitList = new ArrayList<>();
			for (int i = 0; ; i++) {
				if((in.next()).equals("end"))
					break;
				Fruit fruit=new Fruit(in.nextLine());
				if(!fruitList.contains(fruit)){
					fruitList.add(fruit);
				}
				
			}
			for (Fruit f : fruitList) {
				System.out.println(f.toString());
			}
			
		}
		in.close();
	}

	
}